package compute;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Panel;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class Practice2 extends JFrame {
	Ht a=null;
	public Practice2(){
		a=new Ht();
		add(a);
		setTitle("Java");
		setSize(500, 500);
		setLocation(600, 200);
		setResizable(false);
		setVisible(true);
	}
public static void main(String[] args) {
	Practice2 pr=new Practice2();
}
class Ht extends JPanel{
	public void paint(Graphics g){
		/*g.drawOval(200, 200, 100, 150);
		g.drawLine(10, 10, 20, 15);
		g.drawRect(80, 80, 20, 30);
		g.draw3DRect(150, 150, 30, 45, false);
		g.setColor(Color.BLACK);
		g.fillOval(200, 200, 100, 150);*/
		Image tp=Toolkit.getDefaultToolkit().getImage(Panel.class.getResource("1.jpg"));
		g.drawImage(tp, 200, 200, 300, 400, this);
	}
}
}
